import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pvsz/game.dart';
import 'home.dart';


void main() async{
  runApp(const MyApp());
}

var r = (RouteSettings vssss){
  return PageRouteBuilder(
    settings: vssss,
    transitionDuration: (Duration(milliseconds: 250)),
    pageBuilder: (c,a,s){
      switch (vssss.name){
        case 'game':return game();
        default: return game();
      }
    },
    transitionsBuilder: (c,a,s,child){
      return FadeTransition(opacity: a,child: child);
    }
  );
};

class MyApp extends StatelessWidget {
  const MyApp({super.key});


  @override
  Widget build(BuildContext context) {
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight
    ]);
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      onGenerateRoute: r,
    );
  }
}
